﻿@model Tee

@{
    ViewBag.Title = "Opret ny tee";
}

<div class="page-header">
    <h1><span class="glyphicon glyphicon-flag"></span> @ViewBag.Title</h1>
</div>

<div class="alert alert-info alert-dismissable">
    Når du har oprettet banen, kan du redigere denne for at tilføje yderligere information.
</div>
            
@if (!ViewData.ModelState.IsValid)
{
    <div class="alert alert-danger alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        @Html.ValidationSummary("", new { @style = "color: #fff;" })
    </div>
}

@using (Html.BeginForm("Create", "Tee", FormMethod.Post, new { role = "form", @class = "form-horizontal" }))
{
    <div class="form-group">
        <label for="CourseId" class="col-sm-2 control-label">klub/bane</label>
        <div class="col-sm-6">
            <div class="input-group">
                <span class="input-group-addon"><span class="glyphicon glyphicon-globe"></span></span>
                @Html.DropDownListFor(m => m.CourseId, new SelectList(ViewBag.Courses, "Id", "Name"), new { @class = "form-control" })
            </div>
        </div>
    </div>

    <div class="form-group">
        <label for="Gender" class="col-sm-2 control-label">m/k</label>
        <div class="col-sm-6">
            <div class="input-group">
                <span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
                @Html.DropDownListFor(m => m.Gender, new SelectList(ViewBag.Genders), new { @class = "form-control" })
            </div>
        </div>
    </div>

    <div class="form-group">
        <label for="Name" class="col-sm-2 control-label">navn</label>
        <div class="col-sm-6">
            <input type="text" id="Name" name="Name" class="form-control" required placeholder="f.eks. Hvid, Gul eller Rød">
        </div>
    </div>
    
    <div class="form-group">
        <label for="Description" class="col-sm-2 control-label">sløjfe/bane</label>
        <div class="col-sm-6">
            <input type="text" id="Description" name="Description" class="form-control" placeholder="f.eks. Skovbanen (kan efterlades blank)">
        </div>
    </div>

    <div class="form-group">
        <label for="CR" class="col-sm-2 control-label">CR</label>
        <div class="col-sm-6">
            <input type="text" id="CR" name="CR" class="form-control" required placeholder="f.eks. 72,4">
        </div>
    </div>

    <div class="form-group">
        <label for="Slope" class="col-sm-2 control-label">Slope</label>
        <div class="col-sm-6">
            <input type="text" id="Slope" name="Slope" class="form-control" required placeholder="f.eks. 124">
        </div>
    </div>

    @Html.EditorFor(m => m.IsActive)
    
    <div class="form-group">
        <label for="create" class="col-sm-1 col-lg-1 control-label"></label>
        <div class="col-sm-6">
            <button type="submit" class="btn btn-default">opret</button>
        </div>
    </div>
}
